/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package controlacciones.ejb3.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author vanessa
 */
@Embeddable
public class TbMetasPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ano")
    private String ano;
    @Basic(optional = false)
    @Column(name = "mes")
    private String mes;
    @Basic(optional = false)
    @Column(name = "cod_tipo_accion")
    private int codTipoAccion;

    public TbMetasPK() {
    }

    public TbMetasPK(String ano, String mes, int codTipoAccion) {
        this.ano = ano;
        this.mes = mes;
        this.codTipoAccion = codTipoAccion;
    }

    public String getAno() {
        return ano;
    }

    public void setAno(String ano) {
        this.ano = ano;
    }

    public String getMes() {
        return mes;
    }

    public void setMes(String mes) {
        this.mes = mes;
    }

    public int getCodTipoAccion() {
        return codTipoAccion;
    }

    public void setCodTipoAccion(int codTipoAccion) {
        this.codTipoAccion = codTipoAccion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ano != null ? ano.hashCode() : 0);
        hash += (mes != null ? mes.hashCode() : 0);
        hash += (int) codTipoAccion;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TbMetasPK)) {
            return false;
        }
        TbMetasPK other = (TbMetasPK) object;
        if ((this.ano == null && other.ano != null) || (this.ano != null && !this.ano.equals(other.ano))) {
            return false;
        }
        if ((this.mes == null && other.mes != null) || (this.mes != null && !this.mes.equals(other.mes))) {
            return false;
        }
        if (this.codTipoAccion != other.codTipoAccion) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "controlacciones.ejb3.entity.TbMetasPK[ano=" + ano + ", mes=" + mes + ", codTipoAccion=" + codTipoAccion + "]";
    }

}
